using System;
using System.Collections.Generic;
using System.Text;

namespace LogAnalyzerIIS.Objects
{
	/// <summary>
	/// parameters to distinguish different visitors 
	/// </summary>
	public struct HostID
	{
		public string IP;
		public string Browser;
		public string OS;
	}

	/// <summary>
	/// Class for storing daily statistics
	/// </summary>
	public class Statistic
	{
		/// <summary>
		/// date of current log row 
		/// </summary>
		public DateTime RowDate;

		/// <summary>
		/// date of currently processing sequence of rows 
		/// </summary>
		public DateTime CurrentDate = new DateTime(0);

		/// <summary>
		/// row values
		/// </summary>
		public List<string> Row = new List<string>();

		/// <summary>
		/// number of hosts 
		/// </summary>
		public int HostsCount = 0;

		/// <summary>
		/// list of different hosts 
		/// </summary>
		public List<HostID> HostList = new List<HostID>();

		/// <summary>
		/// dictionary of unique entry pages and number of enters to each of them 
		/// </summary>
		public Dictionary<string, int> DayEntryPages = new Dictionary<string, int>();

		/// <summary>
		/// dictionary of unique exit pages and number of exits from each of them 
		/// </summary>
		public Dictionary<string, int> DayExitPages = new Dictionary<string, int>();

		/// <summary>
		/// list of IP addresses to keep track of entry pages  
		/// (if IP isn't in this list, assume that the page he visited is entry)
		/// </summary>
		public List<string> DayEntryIPs = new List<string>();

		/// <summary>
		/// dictionary of IP/page URL to keep track of exit page 
		/// (add or overwrite here a page that user with appropriate IP visits)  
		/// </summary>
		public Dictionary<string, string> DayExitIPs = new Dictionary<string, string>();
	}
}
